From 8c61668a2eacb6bff1f9c49c2b17063f0740abb1 Mon Sep 17 00:00:00 2001 From: "ach61@labyrinth.cl.cam.ac.uk" Date: Thu, 12 Feb 2004 14:02:26 +0000 Subject: [PATCH] bitkeeper revision 1.720 (402b8772rYEU_Vd9LCqLXqSheY4-iQ) turn off watchdog in pdb --- tools/examples/Makefile | 6 +++--- tools/xc/py/Makefile | 5 +++-- xen/arch/i386/pdb-stub.c | 24 +++++++++++++++--------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/tools/examples/Makefile b/tools/examples/Makefile index a30340d701..626b08c915 100644 --- a/tools/examples/Makefile +++ b/tools/examples/Makefile @@ -26,10 +26,10 @@ dist: all mkdir -p ../../../install/bin mkdir -p ../../../install/etc mkdir -p ../../../install/init.d - cp -a $(INSTALL) ../../../install/bin - cp -a $(ETC) ../../../install/etc + install --mode=555 $(INSTALL) ../../../install/bin + install --mode=444 $(ETC) ../../../install/etc #chmod 755 $(INSTALL) - cp -a $(INITD) ../../../install/init.d + install --mode=555 $(INITD) ../../../install/init.d clean: diff --git a/tools/xc/py/Makefile b/tools/xc/py/Makefile index 66fe33df4a..ef7dc42173 100644 --- a/tools/xc/py/Makefile +++ b/tools/xc/py/Makefile @@ -8,9 +8,10 @@ install: all dist: all mkdir -p ../../../../install/lib/python for i in `find . -name 'Xc.so'` ; do \ - cp $$i ../../../../install/lib/python/`basename $$i` ; \ + install --mode=755 $$i ../../../../install/lib/python/`basename $$i` ; \ done python -c 'import py_compile, sys; py_compile.compile("XenoUtil.py")' - cp XenoUtil.py* ../../../../install/lib/python + install --mode=444 XenoUtil.py ../../../../install/lib/python + install --mode=644 XenoUtil.pyc ../../../../install/lib/python clean: rm -rf build *.pyc *.pyo *.o *.a *~ diff --git a/xen/arch/i386/pdb-stub.c b/xen/arch/i386/pdb-stub.c index 035e932cb7..a55e56ace3 100644 --- a/xen/arch/i386/pdb-stub.c +++ b/xen/arch/i386/pdb-stub.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -13,9 +14,6 @@ static const char hexchars[]="0123456789abcdef"; static int remote_debug; -int pdb_foobar = 0x123456; /* testing */ -char *pdb_foobaz = "cambridge"; /* testing */ - #define PDB_BUFMAX 1024 static char pdb_in_buffer[PDB_BUFMAX]; static char pdb_out_buffer[PDB_BUFMAX]; @@ -677,13 +675,16 @@ void pdb_get_packet(char *buffer) * Return 1 if pdb is not interested in the exception; it should * be propagated to the guest os. */ -#define DEBUG_EXCEPTION 1 -#define BREAKPT_EXCEPTION 3 -#define KEYPRESS_EXCEPTION 136 + +#define DEBUG_EXCEPTION 0x01 +#define BREAKPT_EXCEPTION 0x03 +#define KEYPRESS_EXCEPTION 0x88 + int pdb_handle_exception(int exceptionVector, struct pt_regs *xen_regs) { int signal = 0; + int watchdog_save; /* * If PDB didn't set the breakpoint, is not single stepping, and the user @@ -712,6 +713,9 @@ int pdb_handle_exception(int exceptionVector, xen_regs->eip--; } + watchdog_save = watchdog_on; + watchdog_on = 0; + /* Generate a signal for GDB. */ switch ( exceptionVector ) { @@ -722,7 +726,7 @@ int pdb_handle_exception(int exceptionVector, case BREAKPT_EXCEPTION: signal = 5; break; /* SIGTRAP */ default: - printk("can't generate signal for unknown exception vector %d\n", + printk("pdb: can't generate signal for unknown exception vector %d\n", exceptionVector); break; } @@ -739,6 +743,8 @@ int pdb_handle_exception(int exceptionVector, } while ( pdb_process_command(pdb_in_buffer, xen_regs) == 0 ); + watchdog_on = watchdog_save; + return 0; } @@ -773,8 +779,8 @@ void initialize_pdb() return; } - printk("Initializing pervasive debugger (PDB) [%s] port %d, high %d\n", - opt_pdb, pdb_com_port, pdb_high_bit); + printk("Initializing pervasive debugger (PDB) on serial port %d %s\n", + pdb_com_port, pdb_high_bit ? "(high bit enabled)" : ""); /* ack any spurrious gdb packets */ pdb_put_char ('+'); -- 2.30.2